/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import models.UserPageBO;

/**
 *
 * @author BAOLA
 */
public class AddUserToPageAction {

    private String username;
    private int pageId;

    public AddUserToPageAction() {
    }

    public String execute() throws Exception {

        if (username != null) {
            UserPageBO.addUserToPage(username, pageId);
            return "success";
        }
        return "fail";
    }

    /**
     * @return the username
     */
    public String getUsername() {
        return username;
    }

    /**
     * @param username the username to set
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * @return the pageId
     */
    public int getPageId() {
        return pageId;
    }

    /**
     * @param pageId the pageId to set
     */
    public void setPageId(int pageId) {
        this.pageId = pageId;
    }
}
